package viz.controller.core
{
	import org.puremvc.as3.multicore.interfaces.INotification;
	import org.puremvc.as3.multicore.patterns.command.SimpleCommand;
	
	import viz.VizConstants;
	import viz.model.flare.encoders.StateMap2JSON;
	import viz.model.flare.proxies.StateDataProxy;

	public class EncodeData2JSONCmd extends SimpleCommand
	{
		override public function execute(note:INotification):void{
			var data:Object = StateDataProxy(facade.retrieveProxy(StateDataProxy.NAME)).getData();
			data = new StateMap2JSON( data ).decode(  );
			sendNotification( VizConstants.OUTGOING_DATA, data );
		}
		
	}
}